package com.example.wujinapi.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import java.util.ArrayList;
import java.util.List;

@Configuration
public class WebConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        //registry.addInterceptor(new MyInterceptor()).addPathPatterns("/UnifiedOrder");
        List<String> exList=new ArrayList<>();
        exList.add("/wxDecryptPhone"); //此接口需要token验证
        registry.addInterceptor(new JWTinterceptor()).addPathPatterns(exList);
    }
}
